import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-11-29
 * Time: 22:36
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextLine()){
            String s = sc.nextLine();
            int len = s.substring(s.lastIndexOf(' ')+1,s.length()).length();
            System.out.println(len);
        }
        sc.close();
    }
}
